package org.csu.jpetstore.service;

import org.csu.jpetstore.domain.Product;
import org.csu.jpetstore.persistence.LogDAO;
import org.csu.jpetstore.persistence.impl.LogDAOImpl;

import java.util.List;

public class LogService {

    private LogDAO logDAO;

    public LogService() {
        logDAO = new LogDAOImpl();
    }

    public void insert(String username, String time, String event) {
        logDAO.insert(username, time, event);
    }

    public List<String> getHistory(String username) {
        return logDAO.getHistory(username);
    }

    public String getViewTime(String username, Product product) {
        return logDAO.getViewTime(username, product);
    }

}
